﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MesGLApp.DAL.MesDB
{
    [Serializable]
    [Table("target_pp_cycle")]
    public class TargetPPCycle
    {
        /// <summary>
        /// ID，主键，自增长
        /// </summary>
        [Column("id"),Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int ID { get; set; }

        /// <summary>
        /// 工单ID
        /// </summary>
        [Column("target_id")]
        public int TargetID { get; set; }

        /// <summary>
        /// 工单单号
        /// </summary>
        [Column("prod_number")]
        public string ProdNumber { get; set; }

        /// <summary>
        /// 实际SMT完成日期
        /// </summary>
        [Column("smt_date")]
        public DateTime? SmtDate { get; set; }

        /// <summary>
        /// 实际焊接完成日期
        /// </summary>
        [Column("weld_date")]
        public DateTime? WeldDate { get; set; }

        /// <summary>
        /// 实际测试完成日期
        /// </summary>
        [Column("test_date")]
        public DateTime? TestDate { get; set; }

        /// <summary>
        /// 实际包装完成日期
        /// </summary>
        [Column("pack_date")]
        public DateTime? PackDate { get; set; }

        /// <summary>
        /// 实际异常时间
        /// </summary>
        [Column("err_days")]
        public decimal? ErrDate { get; set; }


        /// <summary>
        /// 实际生产完成日期
        /// </summary>
        [Column("end_date")]
        public DateTime? EndDate { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [NotMapped]
        public string Remark { get; set; }

        /// <summary>
        /// 建档日期
        /// </summary>
        [Column("create_date")]
        public DateTime CreateDate { get; set; }

        /// <summary>
        /// 建档人
        /// </summary>
        [Column("create_user")]
        public string CreateUser { get; set; }
    }
}
